package com.demo.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.demo.bean.Paper;
import com.demo.dao.PaperDAO;
import com.demo.service.PaperService;

@Service
public class PaperServiceImpl implements PaperService {

	@Autowired
	PaperDAO paperDAO;
	
	@Transactional
	public Integer save(Paper paper) {
		return paperDAO.save(paper);
	}
	
	@Transactional
	public Integer update(Paper paper) {
		return paperDAO.update(paper);
	}

	public List<Paper> list() {
		return paperDAO.list();
	}

	public Paper get(Integer id) {
		return paperDAO.get(id);
	}

	public void delete(Integer id) {
		paperDAO.delete(id);
	}

}
